<template>
  <FormItem :label="label" :prop="prop" :icon="icon" :single="single">
    <PaasDate
      :readonly="readonly"
      :disabled="disabled"
      :type="type"
      :value="value"
      :format="format"
      @change="change"
      @input="input"
    ></PaasDate>
  </FormItem>
</template>
<script>
import PaasDate from "@/components/PaasDate";

export default {
  components: {
    PaasDate
  },
  props: {
    label: "",
    prop: "",
    type: {
      default: "text"
    },
    single: {
      default: false
    },
    icon: {
      default: ""
    },

    readonly: {
      default: false
    },
    disabled: {
      default: false
    },
    value: "",
    format: {
      default: "YYYYMMDD"
    },
    type: {
      default: "date"
    }
  },
  computed: {
    see() {
      return this.$store.state.forms.see;
    }
  },
  methods: {
    input(data) {
      this.$emit("input", data);
    },
    change(data) {
      this.$emit("change", data);
    }
  }
};
</script>